﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Xml;
using System.Xml.Serialization;

namespace TextProject
{
	public class SColor
	{
		[XmlAttribute("a")]
		public int A { get; set; }
		[XmlAttribute("r")]
		public int R { get; set; }
		[XmlAttribute("g")]
		public int G { get; set; }
		[XmlAttribute("b")]
		public int B { get; set; }
		
		public SColor(Color color)
		{
			A = color.A;
			R = color.R;
			G = color.G;
			B = color.B;
		}

		[XmlIgnore]
		public Color Color
		{
			get
			{
				return Color.FromArgb(A, R, G, B);
			}
		}
	}
}
